using System.Collections;
using UnityEditor;
using UnityEngine;
using System.Collections.Generic;
using System.IO;

public class Platform
{
    public static string GetPlatformFolder(RuntimePlatform target)
    {
        switch (target)
        {
            case RuntimePlatform.Android:
                return "Android";
            case RuntimePlatform.IPhonePlayer:
                return "IOS";
            case RuntimePlatform.WindowsWebPlayer:
                return "WebPlayer";
            case RuntimePlatform.WindowsEditor:
            case RuntimePlatform.WindowsPlayer:
                return "Windows";
            case RuntimePlatform.OSXEditor:
            case RuntimePlatform.OSXPlayer:
                return "OSX";
            default:
                return null;
        }
    }

    public static UnityEditor.BuildTarget ChangeRuntimePlatformToBuildTarget(RuntimePlatform target)
    {
        switch (target)
        {
            case RuntimePlatform.Android:
                return BuildTarget.Android;
            case RuntimePlatform.IPhonePlayer:
                return BuildTarget.iOS;
            case RuntimePlatform.WindowsWebPlayer:
                return BuildTarget.WebPlayer;
            case RuntimePlatform.WindowsEditor:
            case RuntimePlatform.WindowsPlayer:
                return BuildTarget.StandaloneWindows;
            case RuntimePlatform.OSXEditor:
            case RuntimePlatform.OSXPlayer:
                return BuildTarget.StandaloneOSXIntel;
            default:
                return BuildTarget.StandaloneWindows;
        }
    }


}
